# Problem 7
# =========
# By listing the first six prime numbers: 2, 3, 5,
# 7, 11, and 13, we can see that the 6th prime is 13.
#
# What is the 10001st prime number?
from my_euler import primes

#import math
#
#def primes():
#    yield 2 
#
#    p = []
#    c = 3
#    p.append(c)
#
#    while True:
#        yield p[-1]
#        c += 2
#        while True:
#            for n in [e for e in p if e <= math.ceil(math.sqrt(c))]:
#                if c%n==0:
#                    c += 2
#                    break
#            else:
#                p.append(c)
#                break



f = primes()

MAX = 10001

for n in range(1,MAX+1):
    answer = f.next()

print "-> ", answer
